package com.sf.fy.uav.common.enums;

/**
 * @author LTQ
 * @version 1.0
 * @description TODO
 * @date 2021-04-09 11:36
 * @since 1.8
 */
public enum PayStatusEnum {
    /**
     *
     */
    WAIT(1, "待支付"), SUCCESS(2, "支付成功"), EXPIRE(3, "支付过期"), CANCEL(4, "已取消"), DELETE(5, "已删除"), ROLLBACK(6, "已回滚"),
    PENDING(7, "支付中"), REFUND(8, "已退款"), REFUNDING(9, "退款中"), REFUND_FAILED(10, "退款失败"), TO_BE_SETTLED(11, "待结算");
    private String desc;
    private Integer value;

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    PayStatusEnum(Integer value, String desc) {
        this.desc = desc;
        this.value = value;
    }


    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getValue(Integer code) {
        for (PayStatusEnum ele : values()) {
            if (ele.getValue().equals(code)) {
                return ele.getDesc();
            }
        }
        return null;
    }

}
